#cmake_minimum_required(VERSION 2.8.11)
#
#project(calib)

# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
## Instruct CMake to run moc automatically when needed.
#set(CMAKE_AUTOMOC ON)

# Find the QtWidgets library

set ( SOURCES
        main.cpp
        mainwindow.cpp
        ImageCapture.cpp
        )

set ( MOC_HEADERS
        mainwindow.h
        ImageCapture.h
        )

set ( UIS
        mainwindow.ui
        )

#set ( RESOURCES
#        main.qrc
#        )

# Next lines needed for building all Qt projects



# Next, using precompiler, compiler and linker

# using Qt meta-system (precompiler)
QT4_ADD_RESOURCES( RES_SOURCES ${RESOURCES} )
QT4_WRAP_UI( UI_HEADERS ${UIS} )
QT4_WRAP_CPP( MOC_SRCS ${MOC_HEADERS} )


add_executable(calib-gui
        ${SOURCES} ${MOC_SRCS} ${RES_SOURCES} ${UI_HEADERS}
        )

target_link_libraries(calib-gui
        ${QT_LIBRARIES}
        ${OpenCV_LIBS}
        )